<local:DocumentBase x:Class="WPFExcelReport.YCAEKAUDIT"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core" 
                    xmlns:db="clr-namespace:INTEX.DataBase"
                    xmlns:Localization="clr-namespace:Localization;assembly=Localization"
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"  
                    Loaded="Window_Loaded"
                    Background="White" 
     >
    <local:DocumentBase.Resources>
        <ucd:Divideby10  x:Key="d10"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
        <db:SETINTEXDB  x:Key="SetData" />
        <db:SETINTEXDB  x:Key="Set4ITX" />
        <CollectionViewSource   x:Key="vwLIEFDAT" Source="{Binding Path=LIEFDAT,Source={StaticResource SetData}}" />
        <CollectionViewSource  x:Key="vwFunction" Source="{Binding Path=ICC_FUNCTIONS,Source={StaticResource SetData}}" />
        <CollectionViewSource  x:Key="vwEvents" Source="{Binding Path=ICC_WFEVENTDEF,Source={StaticResource SetData}}" />
        <CollectionViewSource   x:Key="vwEKKOPF" Source="{Binding Path=EKKOPF,Source={StaticResource SetData}}" />
        <CollectionViewSource   x:Key="vwEKPOS" Source="{Binding Path=ICC_EKPOS,Source={StaticResource Set4ITX}}" />
        <CollectionViewSource   x:Key="vwABAUFM" Source="{Binding Path=ICC_ABAUFM,Source={StaticResource Set4ITX}}" />
    </local:DocumentBase.Resources>
    <Grid   >
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="1*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="200"></ColumnDefinition>
            <ColumnDefinition Width="1000"></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2"
             >
            <Expander  Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2"
            Name="expLog" ExpandDirection="Down" IsExpanded="True">
                <StackPanel>
                    <WrapPanel Name="zoneCommand" Margin="4,0,51,6" Grid.ColumnSpan="3">
                        <Label Content="{Binding Source={Localization:TranslateExtension Word=系统}}" Width="Auto" Margin="0" HorizontalAlignment="Left" VerticalAlignment="Center" />
                        <TextBox Name="txtMANDANT" MaxLength="2" Width="40" Margin="10,0,0,0"  HorizontalAlignment="Left" Background="Pink"  TabIndex="1" >00</TextBox>
                        <Label Content="{Binding Source={Localization:TranslateExtension Word=语言}}" Width="Auto" Margin="0,0,0,0" HorizontalAlignment="Left"  VerticalAlignment="Center" />
                        <TextBox IsReadOnly="True" Name="txtSPRACHKZ" Width="40" Margin="0,0,0,0" Text="" MaxLength="1" HorizontalAlignment="Left" Background="Pink" FontSize="18" TabIndex="2" />
                        <Label Content="{Binding Source={Localization:TranslateExtension Word=用户名}}" Width="Auto" Margin="10,0,0,0" HorizontalAlignment="Left"  VerticalAlignment="Center" />
                        <TextBox Name="txtUserID" Width="80" Margin="10,0,0,0" Text="" HorizontalAlignment="Left" Background="Yellow" FontSize="18" MaxLength="8" AcceptsTab="False" CharacterCasing="Upper" KeyboardNavigation.TabIndex="0" TabIndex="3" />
                        <Label Content="{Binding Source={Localization:TranslateExtension Word=密码}}" Width="Auto" Margin="10,0,0,0" HorizontalAlignment="Left"  VerticalAlignment="Center" />
                        <PasswordBox Name="txtPassword" Width="80" Margin="10,0,0,0" HorizontalAlignment="Left" Background="Yellow"  KeyboardNavigation.TabIndex="1" TabIndex="4" />
                        <Button Content="{Binding Source={Localization:TranslateExtension Word=登录}}" Height="Auto" Margin="10,0,0,0" Name="btnLogIn" Width="Auto" Click="btnLogIn_Click" KeyboardNavigation.TabIndex="2" IsDefault="True" TabIndex="5">

                        </Button>
                        <TextBlock Name="Administration"></TextBlock>
                        <CheckBox FontSize="14" Content="{Binding Source={Localization:TranslateExtension Word=属于评审组}}" Name="IsBelongs2V9"
                              Visibility="Hidden"></CheckBox>
                        <TextBlock FontSize="14" MinWidth="200" Width="Auto" Name="MemberV9" Background="#FF00AF00"
                               Visibility="Hidden"></TextBlock>
                        <TextBlock Name="txtLogIn" Width="Auto" Margin="10,0,0,0" HorizontalAlignment="Left" Background="White" FontSize="14" KeyboardNavigation.TabIndex="1" />
                    </WrapPanel>
                </StackPanel>
            </Expander>
            <WrapPanel>
                <TextBlock FontSize="18"  Width="Auto"  VerticalAlignment="Center" Margin="0,0,0,0"  Text="{Binding Source={Localization:TranslateExtension Word=采购单}}" />
                <TextBox Background="Yellow"  FontSize="18"    Width="50" Name="txtEKPAUFKRS" CharacterCasing="Upper" Margin="10,0,0,0"
                     MaxLength="2" />
                <TextBox Background="Pink" BorderBrush="Azure"  FontSize="18"    Margin="10,0,0,0" Width="102" Name="txtEKPAUFLFD"  
                     MaxLength="6" />
                <TextBox Background="White"  FontSize="18"    Width="40" Name="txtEKPAUFPOS"   Margin="15,0,0,0"  >000</TextBox>
                <Button FontSize="18" Content="{Binding Source={Localization:TranslateExtension Word=查询}}"  BorderBrush="Yellow" Margin="20,0,0,0"  Click="btnQuery_Click" Width="Auto"/>
                <Button FontSize="18" Content="{Binding Source={Localization:TranslateExtension Word=提交申请}}"  BorderBrush="Yellow" Margin="20,0,0,0"  Click="WFAPPLY_Click" Width="Auto"/>
                <TextBlock Text="{Binding Source={Localization:Translate Word=事件}}"></TextBlock>
                <TextBox Name="txtEvents"  Background="White"   HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" Width="100" />
                <ComboBox   
                    ItemsSource="{Binding Source={StaticResource ResourceKey=vwEvents}}"
                   SelectionChanged="EVENTS_SelectionChanged"
                    Background="Gray"  MinWidth="200"  
                    DisplayMemberPath="WFEDES"
                    IsEditable="True"
                    SelectedValuePath="WFEVENTS"
                    >
                </ComboBox>
                <WrapPanel Name="ZoneIT" IsEnabled="False">
                    <WrapPanel>
                        <TextBlock FontSize="18"     Width="Auto" Margin="0,0,0,0"  Text="{Binding Source={Localization:TranslateExtension Word=确认删除}}" />
                        <TextBox Background="White"  FontSize="18"     Width="Auto" Name="txtDelete"   Margin="15,0,0,0" >N</TextBox>
                        <Button Name="btnApprove" Click="btnApprove_Click" Margin="10,0,0,0" Width="51" VerticalAlignment="Top" Content="{Binding Source={Localization:TranslateExtension Word=审批}}"/>
                        <Button Content="{Binding Source={Localization:TranslateExtension Word=取消财务审核}}"  FontSize="18"  BorderBrush="Yellow" Margin="20,0,0,0"  Width="Auto" Click="cmdBack2EK_Click"/>
                        <!--<Button Content="{Binding Source={Localization:Translate Word=预览}}"  FontSize="18"   BorderBrush="Yellow" Margin="20,0,0,0"  Name="btnPrintPreview" Width="Auto" Click="btnPrintPreview_Click"/>-->
                    </WrapPanel>
                </WrapPanel>
            </WrapPanel>
            <WrapPanel  Name="ZoneManager" IsEnabled="False">
                <Button Content="{Binding Source={Localization:TranslateExtension Word=工作流完成}}"  BorderBrush="Yellow" Margin="20,0,0,0"  Click="btnWFConfirm_Click" Width="Auto"/>
                <Button Content="{Binding Source={Localization:TranslateExtension Word=工作流拒绝}}"  BorderBrush="Yellow" Margin="20,0,0,0"  Click="btnWFReject_Click" Width="Auto"/>
                <Button Content="{Binding Source={Localization:TranslateExtension Word=更改供应商}}"  FontSize="18"  BorderBrush="Yellow" Margin="20,0,0,0"  Width="Auto" Click="cmdChgSupplier_Click"/>
                <Button Content="{Binding Source={Localization:TranslateExtension Word=采购单作废}}"  FontSize="18"  BorderBrush="Yellow" Margin="20,0,0,0"  Width="Auto" Click="cmdThrowEKP_Click"/>
                <Button Content="{Binding Source={Localization:TranslateExtension Word=新增需求}}"  FontSize="18"  BorderBrush="Yellow" Margin="20,0,0,0"  Width="Auto" Click="cmdNewReq_Click" IsEnabled="False" Visibility="Collapsed"/>
                <Button Content="{Binding Source={Localization:TranslateExtension Word=取消采购审核}}"  FontSize="18"  BorderBrush="Yellow" Margin="20,0,0,0"  Width="Auto" Click="cmdBack2EKDispo_Click"/>
                <Button Content="{Binding Source={Localization:TranslateExtension Word=删除采购单}}"  FontSize="18"  BorderBrush="Yellow" Margin="20,0,0,0"  Width="Auto" Click="cmdDeleteEK_Click"/>
                <Button Content="{Binding Source={Localization:TranslateExtension Word=删除需求}}"  FontSize="18"  BorderBrush="Yellow" Margin="20,0,0,0"  Width="Auto" Click="cmdDeleteSingleReq_Click"/>
                <TextBlock Text="{Binding Source={Localization:TranslateExtension Word=释放数量}}"></TextBlock>
                <TextBlock Name="txtReleased" Width="80">0</TextBlock>
                <TextBlock  Text="{Binding Source={Localization:TranslateExtension Word=删除需求会释放需求，并将现有采购单数量再次分配}}"></TextBlock>
            </WrapPanel>
        </StackPanel>
        <Grid Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" >
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="1*"></ColumnDefinition>
                <ColumnDefinition Width="1.5*"></ColumnDefinition>
                <ColumnDefinition Width="1.5*"></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <StackPanel Grid.Column="0">
                <WrapPanel>
                    <WrapPanel>
                        <TextBlock Text="{Binding Source={Localization:TranslateExtension Word=供应商名称}}"></TextBlock>
                        <TextBox Name="txtLSNAME" KeyUp="txtLSNAME_KeyUp" Width="200"></TextBox>
                    </WrapPanel>
                    <ComboBox  ItemsSource="{Binding Source={StaticResource ResourceKey=vwLIEFDAT}}"
                           Margin="10,0,0,0"
                           Background="Gray"  Width="200" 
                           DisplayMemberPath="LSNAME1"
                           IsEditable="True"
                           SelectedValuePath="LSLIEFNR"
                       >
                    </ComboBox>

                </WrapPanel>
                <DataGrid CanUserReorderColumns="True"  
                              CanUserResizeRows="True"              
                              AutoGenerateColumns="False"   
                              EnableRowVirtualization="False"  
                              Name="dlgLSNAME"
                      MaxHeight="400"
                                  Width="Auto"                 
                                  HorizontalAlignment="Left"
                              IsSynchronizedWithCurrentItem="True" Opacity="10" Visibility="Visible"
                              ItemsSource="{Binding Source={StaticResource ResourceKey=vwLIEFDAT}}"  
                              Grid.ColumnSpan="4" Margin="0,1,0,0" Grid.Row="2">
                    <DataGrid.Columns>
                        <DataGridTextColumn Header="{Binding Source={Localization:TranslateExtension Word=供应商}}" Binding="{Binding LSNAME1}" Width="Auto"/>
                    </DataGrid.Columns>
                </DataGrid  >
            </StackPanel>
            <StackPanel Grid.Column="1" Grid.ColumnSpan="2">
                <TextBlock Name="listGS08N"></TextBlock>
                <DataGrid CanUserReorderColumns="True"  
                          Name="dlgMaster"
                              CanUserResizeRows="True" CanUserSortColumns="True"                  
                              AutoGenerateColumns="False"   
                              EnableRowVirtualization="True"  
                              FontSize="12"
                      MaxHeight="300"
                              RowDetailsVisibilityMode="VisibleWhenSelected" HorizontalAlignment="Stretch"  
                              IsSynchronizedWithCurrentItem="True" Opacity="10" Visibility="Visible"
                              ItemsSource="{Binding Source={StaticResource ResourceKey=vwEKPOS}}"  
                              Grid.ColumnSpan="4" Margin="0,1,0,0" Grid.Row="2">
                    <DataGrid.Columns>
                        <DataGridTextColumn Header="{Binding Source={Localization:TranslateExtension Word=采购确认}}" Binding="{Binding EKPBEKZ}" Width="80"/>
                        <DataGridTextColumn Header="{Binding Source={Localization:TranslateExtension Word=审核日期}}" Binding="{Binding EKPKNTRNRL}" Width="80"/>
                        <DataGridTextColumn Header="" Binding="{Binding EKPAUFKRS}" Width="40"/>
                        <DataGridTextColumn Header="{Binding Source={Localization:TranslateExtension Word=采购单}}" Binding="{Binding EKPAUFLFD}" Width="80"/>
                        <DataGridTextColumn Header="" Binding="{Binding EKPAUFPOS}" Width="40"/>
                        <DataGridTextColumn Header="{Binding Source={Localization:TranslateExtension Word=品种}}" Binding="{Binding EKPART}" Width="160"/>
                        <DataGridTextColumn Header="{Binding Source={Localization:TranslateExtension Word=色号}}" Binding="{Binding EKPFARBE}" Width="80"/>
                        <DataGridTextColumn Header="{Binding Source={Localization:TranslateExtension Word=尺寸}}" Binding="{Binding EKPGROE}" Width="80"/>
                        <DataGridTextColumn Header="{Binding Source={Localization:TranslateExtension Word=数量}}" Binding="{Binding Path=EKPME1, Converter={StaticResource ResourceKey=d100}}" Width="80"/>
                        <DataGridTextColumn Header="{Binding Source={Localization:TranslateExtension Word=单价}}" Binding="{Binding Path=EKPPRME, Converter={StaticResource ResourceKey=d1000}}" Width="80"/>
                        <DataGridTextColumn Header="{Binding Source={Localization:TranslateExtension Word=交期}}" Binding="{Binding EKPLTERM}" Width="80"/>
                    </DataGrid.Columns>
                </DataGrid  >
                <DataGrid CanUserReorderColumns="True"  
                      Name="dlgABA"
                              CanUserResizeRows="True" CanUserSortColumns="True"                  
                              AutoGenerateColumns="False"   
                              EnableRowVirtualization="True"  
                              FontSize="12"
                              MaxHeight="300"
                              RowDetailsVisibilityMode="VisibleWhenSelected" HorizontalAlignment="Stretch"  
                              IsSynchronizedWithCurrentItem="True" Opacity="10" Visibility="Visible"
                              ItemsSource="{Binding Source={StaticResource ResourceKey=vwABAUFM}}"  
                              Grid.ColumnSpan="4" Margin="0,1,0,0" Grid.Row="2">
                    <DataGrid.Columns>
                        <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=ID}}" Binding="{Binding ABAID}" Width="Auto"/>
                        <DataGridTextColumn Header="" Binding="{Binding ABAAUFKRS}" Width="40"/>
                        <DataGridTextColumn Header="{Binding Source={Localization:TranslateExtension Word=采购单}}" Binding="{Binding ABAAUFLFD}" Width="80"/>
                        <DataGridTextColumn Header="" Binding="{Binding ABAAUFPOS}" Width="40"/>
                        <DataGridTextColumn Header="{Binding Source={Localization:TranslateExtension Word=原料}}" Binding="{Binding ABAART}" Width="160"/>
                        <DataGridTextColumn Header="{Binding Source={Localization:TranslateExtension Word=色号}}" Binding="{Binding ABAFARBE}" Width="80"/>
                        <DataGridTextColumn Header="{Binding Source={Localization:TranslateExtension Word=尺寸}}" Binding="{Binding ABAGROE}" Width="80"/>
                        <DataGridTextColumn Header="{Binding Source={Localization:TranslateExtension Word=原料}}" Binding="{Binding ABPART}" Width="160"/>
                        <DataGridTextColumn Header="{Binding Source={Localization:TranslateExtension Word=色号}}" Binding="{Binding ABPFARBE}" Width="80"/>
                        <DataGridTextColumn Header="{Binding Source={Localization:TranslateExtension Word=需求数量}}" Binding="{Binding Path=ABARESMG}" Width="80"/>
                        <DataGridTextColumn Header="{Binding Source={Localization:TranslateExtension Word=计划数量}}" Binding="{Binding Path=ABAQTYRESERVE}" Width="80"/>
                        <DataGridTextColumn  Binding="{Binding ABAVKAUFKRS}" Width="160"/>
                        <DataGridTextColumn Header="{Binding Source={Localization:TranslateExtension Word=生产单}}" Binding="{Binding ABAVKAUFLFD}" Width="80"/>
                    </DataGrid.Columns>
                </DataGrid  >
            </StackPanel>
        </Grid>

    </Grid>
</local:DocumentBase>
